# AC example
# the underlying model
g.model = hac(type = AC_GUMBEL, X = 1.5, dim = 2)
# sample from copula g.model
sample = rHAC(100, g.model)
# returns the pdf at each point of the sample
values_1 = dHAC(sample, g.model)
values_2 = dAC(sample[, 1], sample[, 2], theta = 1.5, type = AC_GUMBEL)
round(values_1) == round(values_2) # TRUE
# HAC example
# the underlying model
y = c(~X1, ~X2, ~X3)
theta = c(1.5, 3)
g.model = hac.full(type = HAC_GUMBEL, y, theta)
# sample from copula g.model
sample = rHAC(100, g.model)
# returns the pdf at each point of the sample
values = dHAC(sample, g.model)
Run the code above in your browser using DataLab